<head>
<?php echo $javascript->link('jquery-1.3.2.js');?>
<script type="text/javascript">
$(document).ready(function(){
	/*
	  $("p").click(function(){
	    $(this).hide();
	  });
	  */
	$("#sandwich").click(function(){
		//test();//ok

		mySandwich('ham', 'cheese', function() {
		    alert('Finished eating my sandwich.');
		});
	});
});

///*
function mySandwich(param1, param2, callback) {
    alert('Started eating my sandwich.\n\nIt has: ' + param1 + ', ' + param2);

    $('#sandwich').animate({
        opacity: 0
    }, 2000, function() {
        // Animation complete.
    });

    if (callback && typeof(callback) === "function") {
        callback();
    }
}

function test() {
	alert("test");
}

//*/
</script>
</head>

<body>
<h1>Alert</h1>
<p id="sandwich">click me</p>
<a onmouseover="self.status='Open A Window'; return true;" href="javascript:win1()">
<b>Open Window Example 1</b>
</a>



</body>